Skip to content

feat(bench): Enable aggregating trace in InstructionTracer.js#251

Open
mooori wants to merge 5 commits intonear:mainfrom
mooori:aggr-in-jshelper
Open

feat(bench): Enable aggregating trace in InstructionTracer.js#251
mooori wants to merge 5 commits intonear:mainfrom
mooori:aggr-in-jshelper

Conversation

@mooori
Copy link

@mooori mooori commented Mar 15, 2024

Adds the --aggregate option to the profile-instructions command.

For example. the aggregated trace of the sha256 benchmark is:

{
    "AluRRR": 5043,
    "Load": 4808,
    "Store": 2226,
    "LoadConst64": 2226,
    "LoadConst32": 1570,
    "Mov": 1465,
    "Shru64": 736,
    "Shl64": 625,
    "Call": 33,
    "Jal": 7,
    "ReserveSp": 5,
    "ReleaseSp": 5,
    "VirtualSPOffsetAdj": 2,
    "Icmp": 2,
    "CondBr": 2,
    "Ret": 2,
    "Args": 1
}

Context

We planned to have a discussion whether that kind of aggregation is useful. However, since work on zkwasm will be paused, I think it makes sense to commit this as is to wrap things up. In addition, the --aggregate option provides marginal value:

  • Provide input data for further analysis/tools.
  • Make total count per instruction easily available.

@mooori mooori marked this pull request as ready for review March 22, 2024 12:00
@mooori mooori requested review from MCJOHN974 and aborg-dev March 22, 2024 12:00
@aborg-dev aborg-dev removed their request for review July 26, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant